package com.yehangtech.designpattern.结构型_桥接;

import com.yehangtech.designpattern.结构型_桥接.channel.AbstractPay;
import com.yehangtech.designpattern.结构型_桥接.channel.WXPay;
import com.yehangtech.designpattern.结构型_桥接.channel.ZFBPay;
import com.yehangtech.designpattern.结构型_桥接.mode.PayCypher;
import com.yehangtech.designpattern.结构型_桥接.mode.PayFaceMode;

import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) {
        AbstractPay pay1 = new WXPay(new PayFaceMode());
        String transfer1 = pay1.transfer("001", "741", BigDecimal.valueOf(79.5));
        System.out.println(transfer1);
        System.out.println("-----------------------");
        AbstractPay pay2 = new ZFBPay(new PayCypher());
        String transfer2 = pay2.transfer("083", "79", BigDecimal.valueOf(59.2));
        System.out.println(transfer2);

    }
}
